﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WPFCABShell.$safeprojectname$.Services.Options
{
	/// <summary>
	/// Defines the functionality of an options pane.
	/// </summary>
	/// <remarks>
	/// <para>
	/// An options pane is a UI component used to edit a set of options. Data for the options pane is managed automatically by
	/// the shell. The options pane just needs to allow the data to be applied and retrieved, and also created.
	/// </para>
	/// </remarks>
	public interface IOptionsPane
	{
		/// <summary>
		/// Gets or sets the data for the options pane.
		/// </summary>
		object Data
		{
			get;
			set;
		}

		/// <summary>
		/// Creates a new, default, instance of the options pane's data.
		/// </summary>
		/// <returns>
		/// A newly created default instance of the data for the options pane.
		/// </returns>
		object CreateData();

		/// <summary>
		/// Called when the options pane is closed.
		/// </summary>
		/// <param name="applied">
		/// <see langword="true"/> if the options have been (or should be) applied, otherwise <see langword="false"/>.
		/// </param>
		void Closed(bool applied);
	}
}
